include:
  - localdev

Prepare directory for JobSeekers Code destination:
  file.directory:
    - name: /var/www/seekasia.com/JobSeekers
    - makedirs: True

Prepare Directory for JobSeekers Code Base:
  file.directory:
    - name: /tmp/svn/JobSeekers
    - mode: 777
    - makedirs: True

# This step is done so that any SVN checkout related issue
# can be contained in native FS rather than any shared FS
Checkout local dev JobSeekers Class Code:
  svn.latest:
    - name: svn://svn-pg.jobstreet.com/JobSeekers/trunk/Class
    - target: /tmp/svn/JobSeekers/Class
    - user: lighttpd
    - username: ciuser
    - password: automation
    - unless: test -d /var/www/seekasia.com/JobSeekers/Class

# Also note that I did not use file.copy, as that is intended
# for root (master) -> minion copy only
Copy local dev JobSeekers Class Code to destination:
  cmd.run:
    - name: cp -r /tmp/svn/JobSeekers/Class /var/www/seekasia.com/JobSeekers/
    - unless: test -d /var/www/seekasia.com/JobSeekers/Class

Checkout local dev JobSeekers Zend Code:
  svn.latest:
    - name: svn://svn-pg.jobstreet.com/JobSeekers/trunk/Zend
    - target: /tmp/svn/JobSeekers/Zend
    - user: lighttpd
    - username: ciuser
    - password: automation
    - unless: test -d /var/www/seekasia.com/JobSeekers/Zend

Copy local dev JobSeekers Zend Code to destination:
  cmd.run:
    - name: cp -r /tmp/svn/JobSeekers/Zend /var/www/seekasia.com/JobSeekers/
    - unless: test -d /var/www/seekasia.com/JobSeekers/Zend

